<script lang="ts" setup>
import { onMounted } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { } from 'naive-ui'
import { useFlowStore } from '../component/flowStore'
import Workflow from '../component/index.vue'

const route = useRoute()
const router = useRouter()
const flowStore = useFlowStore()

onMounted(() => {
    const modelId = route.query.modelId as string
    const modelVersion = parseInt(route.query.modelVersion as string)
    const mode = route.query.mode as string
    const instanceId = route.query.instanceId as string
    const taskId = route.query.taskId as string
    flowStore.initWorkflowModel(modelId, modelVersion, mode, instanceId, taskId)
})

</script>
<template>
    <workflow />
</template>
<style scoped></style>